package com.fudan.cfg.trans;

import java.util.List;
import java.util.Map;

import com.fudan.cfg.base.TransDef;
import com.fudan.run.ctx.annotation.TransAdapter;

@TransAdapter("rpc")
public class RpcTransDef extends TransDef{

	private List<String> servers;
	private String method;
	private String target;
	public RpcTransDef(String name, String type,String target) {
		super(name, type,target);
	}

	@Override
	public TransDef build(Map<String, Object> configuration) {
		this.target = (String) configuration.get("target");
		this.method = (String) configuration.get("method");
		this.servers = (List<String>) configuration.get("servers");
		return this;
	}


	public String getMethod() {
		return method;
	}

	public void setMethod(String method) {
		this.method = method;
	}

	public String getTarget() {
		return target;
	}

	public void setTarget(String target) {
		this.target = target;
	}

	public List<String> getServers() {
		return servers;
	}

	public void setServers(List<String> servers) {
		this.servers = servers;
	}


}
